BubbleSort(arr,l)
	var n = l;
	FOROdo:
	if not (n>1) goto FOROdone;
	(* for (n=l; n>1; n=n-1){ *)
		var i = 0;
		FORIdo:
		if (i>n+(-2)) goto FORIdone;
		(* for (i=0; i<n-1; i=i+1){ *)
			if not (arr[i] > arr[i+1]) goto IFelse;
			(* if (arr[i] > arr[i+1]){ *)
				var tmp = arr[i];
				arr[i] = arr[i+1];
				arr[i+1] = tmp;
			(* } *)
			IFelse:
		i = i + 1;
		goto FORIdo;
		(* } *)
		FORIdone:
	n = n + (-1);
	goto FOROdo;
	(* } *)
	FOROdone:
	return 777;
end;
